<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<p></p>
<p>hello javascript</p>

<img src="1.png" alt="desktop">

<button>普通按钮</button>

<table>

    <thead></thead>
    <tbody>

    </tbody>
</table>

<script>
    var p = document.getElementsByTagName('p')[0]
    // 获取文本内容
    console.log(p.innerText);
    // 改变文本内容
    p.innerText = 'hi javascript'

    var img = document.getElementsByTagName('img')[0]
    console.log(img.src);
    img.src = ''


    document.getElementsByTagName('button')[0].onclick = function () {
        console.log('click')
    }
    // 1. tbody     2. 遍历数组  tr  3.遍历对象属性   td

</script>

</body>
</html>